Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove non-relevant tests #1004

Merged
merged 2 commits into from
Jan 2, 2025

Conversation

whiterabbit1983
Copy link
Contributor

@whiterabbit1983 whiterabbit1983 commented Jan 2, 2025

PR Type

Tests


Description

  • Removed non-relevant test cases from test_activities.py.

  • Cleaned up unused imports and commented-out code.


Changes walkthrough 📝

Relevant files
Tests
test_activities.py
Removed non-relevant tests and unused imports                       

agents-api/tests/test_activities.py

  • Removed commented-out test cases and related imports.
  • Cleaned up unused code and imports for better readability.
  • +0/-29   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information


    Important

    Remove non-relevant commented-out tests from test_activities.py, retaining demo workflow test.

    • Tests:
      • Remove commented-out tests related to embed_docs in test_activities.py.
      • Retain test for calling demo workflow via temporal client in test_activities.py.

    This description was created by Ellipsis for f282a85. It will automatically update as commits are pushed.

    @whiterabbit1983 whiterabbit1983 marked this pull request as ready for review January 2, 2025 07:12
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link
    Contributor

    @ellipsis-dev ellipsis-dev bot left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    👍 Looks good to me! Reviewed everything up to f282a85 in 9 seconds

    More details
    • Looked at 46 lines of code in 1 files
    • Skipped 0 files when reviewing.
    • Skipped posting 1 drafted comments based on config settings.
    1. agents-api/tests/test_activities.py:12
    • Draft comment:
      Consider using a descriptive name for the test function instead of an underscore to improve readability and maintainability.
    • Reason this comment was not posted:
      Confidence changes required: 50%
      The test function is using an underscore as its name, which is not descriptive. This can make it difficult to understand the purpose of the test at a glance.

    Workflow ID: wflow_irHW0tsr4tQ6BXMv


    You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

    Copy link
    Contributor

    qodo-merge-pro-for-open-source bot commented Jan 2, 2025

    CI Failure Feedback 🧐

    (Checks updated until commit f282a85)

    Action: Typecheck

    Failed stage: Typecheck [❌]

    Failed test name: agents_api.app

    Failure summary:

    The action failed due to multiple attribute errors in the file agents_api/app.py. The main issues
    are:

  • The code is trying to access a state attribute on a container object, but container appears to be a
    list type
  • There are 10 instances where the code attempts to access or modify container.state properties (like
    postgres_pool and s3_client)
  • The type checker (pytype) detected these attribute errors and failed the build
  • The specific error is "No attribute 'state' on list [attribute-error]"

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    1207:  [1/294] check agents_api.autogen.Common
    1208:  [2/294] check agents_api.autogen.Docs
    1209:  [3/294] check agents_api.env
    1210:  [4/294] check agents_api.autogen.Tools
    1211:  [5/294] check agents_api.clients.pg
    1212:  [6/294] check agents_api.autogen.Users
    1213:  [7/294] check agents_api.autogen.Sessions
    1214:  [8/294] check agents_api.app
    1215:  FAILED: /home/runner/work/julep/julep/agents-api/.pytype/pyi/agents_api/app.pyi 
    1216:  /home/runner/work/julep/julep/agents-api/.venv/bin/python -m pytype.main --disable pyi-error --imports_info /home/runner/work/julep/julep/agents-api/.pytype/imports/agents_api.app.imports --module-name agents_api.app --platform linux -V 3.12 -o /home/runner/work/julep/julep/agents-api/.pytype/pyi/agents_api/app.pyi --analyze-annotated --nofail --none-is-not-bool --quick --strict-none-binding /home/runner/work/julep/julep/agents-api/agents_api/app.py
    1217:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:29:24: error: in lifespan: No attribute 'state' on list [attribute-error]
    1218:  if not getattr(container.state, "postgres_pool", None):
    1219:  ~~~~~~~~~~~~~~~
    1220:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:30:13: error: in lifespan: No attribute 'state' on list [attribute-error]
    1221:  container.state.postgres_pool = await create_db_pool(pg_dsn)
    1222:  ~~~~~~~~~~~~~~~
    1223:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:38:24: error: in lifespan: No attribute 'state' on list [attribute-error]
    1224:  if not getattr(container.state, "s3_client", None):
    1225:  ~~~~~~~~~~~~~~~
    1226:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:40:13: error: in lifespan: No attribute 'state' on list [attribute-error]
    1227:  container.state.s3_client = await session.create_client(
    1228:  ~~~~~~~~~~~~~~~
    1229:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:52:24: error: in lifespan: No attribute 'state' on list [attribute-error]
    1230:  if getattr(container.state, "postgres_pool", None):
    1231:  ~~~~~~~~~~~~~~~
    1232:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:53:23: error: in lifespan: No attribute 'state' on list [attribute-error]
    1233:  await container.state.postgres_pool.close()
    1234:  ~~~~~~~~~~~~~~~
    1235:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:54:17: error: in lifespan: No attribute 'state' on list [attribute-error]
    1236:  container.state.postgres_pool = None
    1237:  ~~~~~~~~~~~~~~~
    1238:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:58:24: error: in lifespan: No attribute 'state' on list [attribute-error]
    1239:  if getattr(container.state, "s3_client", None):
    1240:  ~~~~~~~~~~~~~~~
    1241:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:59:23: error: in lifespan: No attribute 'state' on list [attribute-error]
    1242:  await container.state.s3_client.close()
    1243:  ~~~~~~~~~~~~~~~
    1244:  /home/runner/work/julep/julep/agents-api/agents_api/app.py:60:17: error: in lifespan: No attribute 'state' on list [attribute-error]
    1245:  container.state.s3_client = None
    1246:  ~~~~~~~~~~~~~~~
    1247:  For more details, see https://google.github.io/pytype/errors.html#attribute-error
    ...
    
    1320:  [81/294] check agents_api.common.exceptions.sessions
    1321:  [82/294] check agents_api.clients.__init__
    1322:  [83/294] check tests.sample_tasks.__init__
    1323:  [84/294] check agents_api.autogen.__init__
    1324:  [85/294] check agents_api.common.protocol.state_machine
    1325:  [86/294] check agents_api.routers.sessions.exceptions
    1326:  [87/294] check agents_api.common.utils.json
    1327:  [88/294] check agents_api.rec_sum.entities
    1328:  ninja: build stopped: cannot make progress due to previous errors.
    1329:  Computing dependencies
    1330:  Generated API key since not set in the environment: 11293049040235722258946826237866
    1331:  Sentry DSN not found. Sentry will not be enabled.
    1332:  Analyzing 284 sources with 0 local dependencies
    1333:  Leaving directory '.pytype'
    1334:  ##[error]Process completed with exit code 1.
    ...
    
    1336:  [command]/usr/bin/git version
    1337:  git version 2.47.1
    1338:  Temporarily overriding HOME='/home/runner/work/_temp/187f26a0-590f-45c4-9ff4-834c6b7c9615' before making global git config changes
    1339:  Adding repository directory to the temporary git global config as a safe directory
    1340:  [command]/usr/bin/git config --global --add safe.directory /home/runner/work/julep/julep
    1341:  [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
    1342:  [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
    1343:  fatal: No url found for submodule path 'drafts/cozo' in .gitmodules
    1344:  ##[warning]The process '/usr/bin/git' failed with exit code 128
    

    ✨ CI feedback usage guide:

    The CI feedback tool (/checks) automatically triggers when a PR has a failed check.
    The tool analyzes the failed checks and provides several feedbacks:

    • Failed stage
    • Failed test name
    • Failure summary
    • Relevant error logs

    In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR:

    /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}"
    

    where {repo_name} is the name of the repository, {run_number} is the run number of the failed check, and {job_number} is the job number of the failed check.

    Configuration options

    • enable_auto_checks_feedback - if set to true, the tool will automatically provide feedback when a check is failed. Default is true.
    • excluded_checks_list - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list.
    • enable_help_text - if set to true, the tool will provide a help message with the feedback. Default is true.
    • persistent_comment - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true.
    • final_update_message - if persistent_comment is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true.

    See more information about the checks tool in the docs.

    @creatorrr creatorrr merged commit af37fb7 into f/switch-to-pg Jan 2, 2025
    7 of 9 checks passed
    @creatorrr creatorrr deleted the c/remove-non-relevant-tests branch January 2, 2025 07:37
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants